package com.sea.physical.service.impl;

import com.sea.physical.entity.Freight;
import com.sea.physical.entity.FreightRecord;
import com.sea.physical.mapper.FreightMapper;
import com.sea.physical.mapper.FreightRecordMapper;
import com.sea.physical.service.FreightRecordService;
import com.sea.physical.service.FreightService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FreightRecordServiceImpl implements FreightRecordService {

    @Autowired
    private FreightRecordMapper freightRecordMapper;

    @Override
    public List<FreightRecord> findByFreightId(Integer freightId) {
        return freightRecordMapper.findByFreightId(freightId);
    }

    @Override
    public int save(FreightRecord freightRecord) {
        return freightRecordMapper.insert(freightRecord);
    }
}
